package com.jfok.server.logic;

import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.jfok.shared.module.ModuleFormOperateType;
import com.jfok.shared.module.grid.GridFilterData;


public interface IModuleOperateLogic<T> {

	
	public boolean beforeInsert(T inserted, Map<String, String> errorMessage,
			HttpServletRequest request);

	public boolean afterInsert(T inserted, HttpServletRequest request);

	
	public boolean beforeUpdate(ModuleFormOperateType type, T updatedObject, T oldObject,
			Map<String, String> errorMessage, HttpServletRequest request);

	public boolean afterUpdate(ModuleFormOperateType type, T updatedObject, T oldObject,
			HttpServletRequest request);

	public boolean beforeDelete(T deleted, List<String> errorMessage, HttpServletRequest request);

	public boolean afterDelete(T deleted, HttpServletRequest request);

	
	public Map<String, Object> getNewDefultValue(HttpServletRequest request,
			GridFilterData gridFilterData);

}
